<template>
    <div class="detail_container__gKAcX">
        <nav class="ant-breadcrumb detail_breadcrumb__hZzd3">
            <ol>
                <li><a class="ant-breadcrumb-link" href="/">首页</a><span class="ant-breadcrumb-separator">&gt;</span></li>
               
                <li><span class="ant-breadcrumb-link" v-text="activiModel?.name"></span></li>
            </ol>
        </nav>
        <div class="detail_postWrapper__6j9wr">
            <div style="width: calc(100% - 345px);">
                <article class="detail_post__5EZ_P">
                    <div class="detail_entryMain__H5HyW">
                        <div class="detail_entryHead___xicO">
                            <h1 class="detail_entryTitle__Jh4CR" v-text="activiModel?.name"></h1>
                            <div class="detail_entryInfo__8TF0T"><span></span><span class="detail_dot__izADT">•</span><time
                                    :datetime="activiModel?.createTime" v-text="activiModel?.createTime"> </time><span
                                    class="detail_dot__izADT">•</span>
                                    <!-- <span>阅读 27</span> -->
                                </div>
                        </div>
                        <div class="detail_entryContent__4WAq_" v-html="activiModel?.context"> 
                        </div><!---->
                    </div>
                </article>
                <!-- <div class="detail_entryPage__DmpVE"><a>
                        <div class="detail_pageControl__cgOfj">
                            <div class="detail_pageBox__qI3Zk">上一篇</div>
                            <div class="detail_contentBox__CyAj4">
                                <p></p><span></span>
                            </div>
                        </div>
                    </a><a title="低空经济产业链概述">
                        <div class="detail_pageControl__cgOfj">
                            <div class="detail_pageBox__qI3Zk">下一篇</div>
                            <div class="detail_contentBox__CyAj4">
                                <p>低空经济产业链概述</p><span>2024-09-29</span>
                            </div>
                        </div>
                    </a></div> -->
            </div>
            <div class="detail_sidebar__SMc_H">
                <div class="detail_widget__8Hmp0 detail_widget_recent__T_11i">
                    <h3 class="detail_reportListTitle__266h_">最新报告</h3>
                    <ul v-for="item in newsData" :key="item.id">
                        <li><a target="_blank" class="detail_widgetItem__qAGiZ" rel="nofollow"><span v-text="item.name" @click="clickItem(item.id)"> </span></a></li>
                        
                    </ul>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup lang="ts">
import {newsApi,newsListApi} from '@/api/activi/index'
import type {ActiviModel,HotActiviModelParam} from '@/api/activi/index'
const newsData = ref<ActiviModel[]>([{id:'',name:'',context:'',createTime:'',image:''}])
    const newParam=ref<HotActiviModelParam>({pageNum:1,pageSize:10,type:1,hotspot:''}); 

    async function getNewsList(){
    const res= await newsListApi(newParam.value)
     if(res.code==200){
        newsData.value=res.data?.records ?? [] 
    }
}
const activiModel=ref<ActiviModel>()
const route=useRoute() 
onMounted(async()=>{
    getNewsOne(route.params.id)
   getNewsList()
})

async function getNewsOne(id:any){
    const res= await newsApi(id)
   if(res.code===200){
       activiModel.value=res.data
   }else{
    ElMessage.error(res.msg)
   }
}
function clickItem(id:number){
    getNewsOne(id)
}
</script>
<style scoped lang='less'>
.detail_container__gKAcX {
    width: 1300px;
    margin: 0 auto;
    padding: 15px 0;
}

.ant-breadcrumb {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: #000000d9;
    font-variant: tabular-nums;
    line-height: 1.5715;
    list-style: none;
    font-feature-settings: "tnum", "tnum";
    color: #00000073;
    font-size: 14px;
}

.detail_postWrapper__6j9wr {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin-top: 15px;
}

.detail_post__5EZ_P {
    background-color: #fff;
    width: 100%;
}

.detail_post__5EZ_P .detail_entryMain__H5HyW {
    padding: 20px;
}

.detail_post__5EZ_P .detail_entryTitle__Jh4CR {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    line-height: 1.4;
}

.detail_post__5EZ_P .detail_entryInfo__8TF0T {
    padding-bottom: 10px;
    color: #27272799;
}

.detail_post__5EZ_P .detail_dot__izADT {
    margin: 0 8px;
    color: #27272799;
}

.detail_post__5EZ_P .detail_entryContent__4WAq_ {
    position: relative;
    margin-bottom: 30px;
    font-size: 16px;
    color: #262626;
    line-height: 1.8;
}

.detail_entryPage__DmpVE {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    width: 860px;
}

a {
    color: #2d5bf7;
    text-decoration: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    transition: color .3s;
    -webkit-text-decoration-skip: objects;
}

.detail_entryPage__DmpVE .detail_pageControl__cgOfj {
    background-color: #fffc;
    box-sizing: border-box;
    width: 422px;
    height: 80px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    color: #262626;
}

.detail_entryPage__DmpVE .detail_pageControl__cgOfj .detail_pageBox__qI3Zk {
    min-width: 80px;
    text-align: center;
}

.detail_entryPage__DmpVE .detail_pageControl__cgOfj .detail_contentBox__CyAj4 {
    position: relative;
    padding: 0 10px;
}

.detail_entryPage__DmpVE .detail_pageControl__cgOfj .detail_contentBox__CyAj4:before {
    position: absolute;
    content: "";
    width: 1px;
    height: 100%;
    background-color: #e2e3e499;
    top: 0;
    left: -10px;
}

.detail_entryPage__DmpVE .detail_pageControl__cgOfj .detail_contentBox__CyAj4>p {
    font-size: 14px;
    margin-bottom: 6px;
    word-break: break-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.detail_entryPage__DmpVE .detail_pageControl__cgOfj .detail_contentBox__CyAj4>span {
    color: #b1b1b1;
}

a {
    color: #2d5bf7;
    text-decoration: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    transition: color .3s;
    -webkit-text-decoration-skip: objects;
}

a {
    color: #2d5bf7;
    text-decoration: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    transition: color .3s;
    -webkit-text-decoration-skip: objects;
}

.detail_sidebar__SMc_H .detail_widget__8Hmp0 {
    padding: 15px;
    background-color: #fff;
}

.detail_sidebar__SMc_H .detail_widget_recent__T_11i {
    margin-bottom: 15px;
}

.detail_reportListTitle__266h_ {
    position: relative;
    margin: 2px 0 15px;
    padding: 0 0 0 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.detail_reportListTitle__266h_:before {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    content: "";
    background-color: #2d5bf7;
    background-image: linear-gradient(180deg, hsla(0, 0%, 100%, .15), transparent);
    border-radius: 3px;
}

.detail_sidebar__SMc_H .detail_widget__8Hmp0>ul>li {
    position: relative;
    padding: 5px 0 14px 12px;
    line-height: 1.46;
    list-style: none;
}

a {
    color: #2d5bf7;
    text-decoration: none;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    transition: color .3s;
    -webkit-text-decoration-skip: objects;
}

.detail_sidebar__SMc_H .detail_widget__8Hmp0>ul a {
    color: #252525cc;
}

.detail_sidebar__SMc_H .detail_widget__8Hmp0 .detail_widgetItem__qAGiZ {
    display: flex;
    align-items: center;
    margin-left: -13px;
    cursor: pointer;
}

.detail_sidebar__SMc_H .detail_widget__8Hmp0 .detail_widgetItem__qAGiZ>span {
    word-break: break-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding-left: 10px;
}

.detail_sidebar__SMc_H {
    width: 325px;
    display: flex;
    flex-direction: column;
}

.ant-breadcrumb {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: #000000d9;
    font-variant: tabular-nums;
    line-height: 1.5715;
    list-style: none;
    font-feature-settings: "tnum", "tnum";
    color: #00000073;
    font-size: 14px;
}

.ant-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ant-breadcrumb a {
    color: #00000073;
    transition: color .3s;
}

.ant-breadcrumb-separator {
    margin: 0 8px;
    color: #00000073;
}</style>